#!/bin/sh

echo 'stopping existing container...'
docker stop jupyter
echo 'removing existing container...'
docker rm jupyter
echo 'configurating container...'
rm -r /mnt/xvdf/container/jupyter/ssl
cp ./jupyter/* /mnt/xvdf/container/jupyter/
cp -r /mnt/xvdf/ssl /mnt/xvdf/container/jupyter/
echo 'starting service on port 8844...'
docker pull binbinxm/ubuntu:conda
docker run -dt -v /mnt/xvdf/container/jupyter:/mnt -p 8844:8844 --name=jupyter --restart=always binbinxm/ubuntu:conda zsh -c '/mnt/startup.sh'

